<include file="public@header" />
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li  class="active"><a href="{:url('register/adduser')}">消费记录</a></li>

	</ul>
	<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('register/addIntegralPost')}">

		<div class="form-group">
			<label for="input-user_reg" class="col-sm-2 control-label"><span class="form-required"></span>添加积分</label>
			<div class="col-md-6 col-sm-10">
				<input type="number" class="form-control" id="input-user_reg" name="integral" placeholder="±都可以">

				<input type="hidden" class="form-control" id="" name="user_id" placeholder="" value="{$userId}">
			</div>
		</div>
		<div class="form-group">
			<label for="input-user_mark" class="col-sm-2 control-label"><span class="form-required"></span>描述</label>
			<div class="col-md-6 col-sm-10">
				<textarea id="input-user_mark" cols="75" rows="5" name="desc"></textarea>
			</div>
		</div>

		<div class="form-group">
			<div class="col-sm-offset-2 col-sm-10">
				<button  type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
			</div>
		</div>
	</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
<script>
    $(function(){
        $('.btn').bind('click',function(){
            var mon = $(":input[name='money']").val();

            if(mon == 58){
                var is_ture = confirm('请问是升级成社员吗？');
                if(is_ture){
                    $(":input[name='type']").val(0);
                }else{
                    $(":input[name='type']").val(1);
                }
            }else{
                $(":input[name='type']").val(1);
            }
            //$('form').submit();
            //alert($(":input[name='type']").val());
        })



    })
</script>
</html>